﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <link href="YanGantAdd.css" rel="stylesheet" type="text/css" />
    <link href="../../CSS/bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../../Scripts/jquery-1.8.0.min.js"></script>
    <script type="text/javascript" src="../../Scripts/json2.js"></script>
    <script type="text/javascript" src="../../CSS/bootstrap/js/bootstrap.js"></script>

    <script type="text/javascript" src="YanGantAdd.js"></script>
    <script type="text/javascript" src="JDJH.js"></script>
    <script type="text/javascript" src="../../Scripts/Common.js"></script>

    <script type="text/javascript">
        //var gantdata = '{ "startdate":"2012-05-22", "enddate":"2012-05-28", "taskpid":"85","tasks": [ { "taskid":"87ZT","prtaskid":"87","taskname":"总图","taskuser":"", "taskPSdate":"2012-05-22","taskPEdate":"2012-05-27","taskASdate":"","taskAEdate":"","tasklev":"1"},{ "taskid":"87JZ","prtaskid":"87","taskname":"建筑","taskuser":"", "taskPSdate":"2012-05-22","taskPEdate":"2012-05-27","taskASdate":"","taskAEdate":"","tasklev":"1"},{ "taskid":"87JG","prtaskid":"87","taskname":"结构","taskuser":"", "taskPSdate":"2012-05-22","taskPEdate":"2012-05-27","taskASdate":"","taskAEdate":"","tasklev":"1"},{ "taskid":"87","prtaskid":"","taskname":"浅园仓","taskuser":"闫炜,牛淑杰,刘玉,张强,吴强", "taskPSdate":"2012-05-22","taskPEdate":"2012-05-27","taskASdate":"","taskAEdate":"","tasklev":"0"},{ "taskid":"86ZT","prtaskid":"86","taskname":"总图","taskuser":"", "taskPSdate":"2012-05-22","taskPEdate":"2012-05-28","taskASdate":"","taskAEdate":"","tasklev":"1"},{ "taskid":"86JZ","prtaskid":"86","taskname":"建筑","taskuser":"", "taskPSdate":"2012-05-22","taskPEdate":"2012-05-22","taskASdate":"","taskAEdate":"","tasklev":"1"},{ "taskid":"86JG","prtaskid":"86","taskname":"结构","taskuser":"", "taskPSdate":"2012-05-22","taskPEdate":"2012-05-28","taskASdate":"2012-05-22","taskAEdate":"2012-05-22","tasklev":"1"},{ "taskid":"86GY","prtaskid":"86","taskname":"粮食","taskuser":"", "taskPSdate":"2012-05-22","taskPEdate":"2012-05-22","taskASdate":"2012-05-22","taskAEdate":"","tasklev":"1"},{ "taskid":"86","prtaskid":"","taskname":"办公楼","taskuser":"张强,刘玉,吴强", "taskPSdate":"2012-05-22","taskPEdate":"2012-05-28","taskASdate":"","taskAEdate":"","tasklev":"0"},{ "taskid":"100223","prtaskid":"87JG","taskname":"审定","taskuser":"吴强", "taskPSdate":"2012-05-27","taskPEdate":"2012-05-27","taskASdate":"","taskAEdate":"","tasklev":"2"},{ "taskid":"100222","prtaskid":"87JG","taskname":"审核","taskuser":"吴强", "taskPSdate":"2012-05-26","taskPEdate":"2012-05-26","taskASdate":"","taskAEdate":"","tasklev":"2"},{ "taskid":"100221","prtaskid":"87JG","taskname":"校对","taskuser":"张强", "taskPSdate":"2012-05-25","taskPEdate":"2012-05-25","taskASdate":"","taskAEdate":"","tasklev":"2"},{ "taskid":"100220","prtaskid":"87JG","taskname":"完成产品","taskuser":"刘玉", "taskPSdate":"2012-05-24","taskPEdate":"2012-05-24","taskASdate":"","taskAEdate":"","tasklev":"2"},{ "taskid":"100219","prtaskid":"87JG","taskname":"互提资料","taskuser":"刘玉", "taskPSdate":"2012-05-22","taskPEdate":"2012-05-23","taskASdate":"","taskAEdate":"","tasklev":"2"},{ "taskid":"100218","prtaskid":"87JZ","taskname":"审定","taskuser":"牛淑杰", "taskPSdate":"2012-05-27","taskPEdate":"2012-05-27","taskASdate":"","taskAEdate":"","tasklev":"2"},{ "taskid":"100217","prtaskid":"87JZ","taskname":"审核","taskuser":"牛淑杰", "taskPSdate":"2012-05-26","taskPEdate":"2012-05-26","taskASdate":"","taskAEdate":"","tasklev":"2"},{ "taskid":"100216","prtaskid":"87JZ","taskname":"校对","taskuser":"牛淑杰", "taskPSdate":"2012-05-25","taskPEdate":"2012-05-25","taskASdate":"","taskAEdate":"","tasklev":"2"},{ "taskid":"100215","prtaskid":"87JZ","taskname":"完成产品","taskuser":"闫炜", "taskPSdate":"2012-05-24","taskPEdate":"2012-05-24","taskASdate":"","taskAEdate":"","tasklev":"2"},{ "taskid":"100214","prtaskid":"87JZ","taskname":"互提资料","taskuser":"闫炜", "taskPSdate":"2012-05-22","taskPEdate":"2012-05-23","taskASdate":"","taskAEdate":"","tasklev":"2"},{ "taskid":"100213","prtaskid":"87ZT","taskname":"审定","taskuser":"牛淑杰", "taskPSdate":"2012-05-27","taskPEdate":"2012-05-27","taskASdate":"","taskAEdate":"","tasklev":"2"},{ "taskid":"100212","prtaskid":"87ZT","taskname":"审核","taskuser":"牛淑杰", "taskPSdate":"2012-05-26","taskPEdate":"2012-05-26","taskASdate":"","taskAEdate":"","tasklev":"2"},{ "taskid":"100211","prtaskid":"87ZT","taskname":"校对","taskuser":"牛淑杰", "taskPSdate":"2012-05-25","taskPEdate":"2012-05-25","taskASdate":"","taskAEdate":"","tasklev":"2"},{ "taskid":"100210","prtaskid":"87ZT","taskname":"完成产品","taskuser":"闫炜", "taskPSdate":"2012-05-24","taskPEdate":"2012-05-24","taskASdate":"","taskAEdate":"","tasklev":"2"},{ "taskid":"100209","prtaskid":"87ZT","taskname":"互提资料","taskuser":"闫炜", "taskPSdate":"2012-05-22","taskPEdate":"2012-05-23","taskASdate":"","taskAEdate":"","tasklev":"2"},{ "taskid":"100208","prtaskid":"86JZ","taskname":"完成产品","taskuser":"吴强", "taskPSdate":"2012-05-22","taskPEdate":"2012-05-22","taskASdate":"","taskAEdate":"","tasklev":"2"},{ "taskid":"100207","prtaskid":"86GY","taskname":"互提资料","taskuser":"刘玉", "taskPSdate":"2012-05-22","taskPEdate":"2012-05-22","taskASdate":"2012-05-22","taskAEdate":"","tasklev":"2"},{ "taskid":"100206","prtaskid":"86JG","taskname":"审定","taskuser":"吴强", "taskPSdate":"2012-05-28","taskPEdate":"2012-05-28","taskASdate":"","taskAEdate":"","tasklev":"2"},{ "taskid":"100205","prtaskid":"86JG","taskname":"审核","taskuser":"刘玉", "taskPSdate":"2012-05-27","taskPEdate":"2012-05-27","taskASdate":"2012-05-22","taskAEdate":"","tasklev":"2"},{ "taskid":"100204","prtaskid":"86JG","taskname":"校对","taskuser":"张强", "taskPSdate":"2012-05-26","taskPEdate":"2012-05-26","taskASdate":"2012-05-22","taskAEdate":"2012-05-22","tasklev":"2"},{ "taskid":"100203","prtaskid":"86JG","taskname":"完成产品","taskuser":"刘玉", "taskPSdate":"2012-05-24","taskPEdate":"2012-05-25","taskASdate":"","taskAEdate":"2012-05-22","tasklev":"2"},{ "taskid":"100202","prtaskid":"86JG","taskname":"互提资料","taskuser":"张强", "taskPSdate":"2012-05-22","taskPEdate":"2012-05-23","taskASdate":"","taskAEdate":"","tasklev":"2"},{ "taskid":"100201","prtaskid":"86ZT","taskname":"审定","taskuser":"吴强", "taskPSdate":"2012-05-28","taskPEdate":"2012-05-28","taskASdate":"","taskAEdate":"","tasklev":"2"},{ "taskid":"100200","prtaskid":"86ZT","taskname":"审核","taskuser":"刘玉", "taskPSdate":"2012-05-27","taskPEdate":"2012-05-27","taskASdate":"","taskAEdate":"","tasklev":"2"},{ "taskid":"100199","prtaskid":"86ZT","taskname":"校对","taskuser":"张强", "taskPSdate":"2012-05-26","taskPEdate":"2012-05-26","taskASdate":"","taskAEdate":"","tasklev":"2"},{ "taskid":"100198","prtaskid":"86ZT","taskname":"完成产品","taskuser":"刘玉", "taskPSdate":"2012-05-24","taskPEdate":"2012-05-25","taskASdate":"","taskAEdate":"","tasklev":"2"},{ "taskid":"100197","prtaskid":"86ZT","taskname":"互提资料","taskuser":"张强", "taskPSdate":"2012-05-22","taskPEdate":"2012-05-23","taskASdate":"","taskAEdate":"","tasklev":"2"} ]}';
        $(function () {
            $("#addLink").popover({
                content: function () {
                    return $(".addZX").clone(true).html();
                },
                showed: function (tip) {
                    ComFunJS.initForm();
                    $(".qd", tip.$tip).click(function () {
                        var zxname = $(".zxname", tip.$tip).val();
                        var sdate = $(".sdate", tip.$tip).val();
                        var edate = $(".edate", tip.$tip).val();

                        addTab(zxname, sdate, edate);

                    })
                    $(".qx", tip.$tip).click(function () {
                        $("#addLink").popover('hide');
                    })
                }
            });
            ComFunJS.initForm();
        });

    </script>
</head>
<body>
    <div style="height: 140px">
        <button class="btn btn-primary" type="button">
        Messages <span class="badge">4</span>
      </button>
    </div>

    <div class="tabbable">
        <!-- Only required for left/right tabs -->
        <ul class="nav nav-tabs" id="myTab">
            <li id="addChi" style="cursor: pointer"><a class="popovertip" id="addLink" data-toggle="popover" data-html="true" data-original-title="添加子项"><i class="icon-plus"></i>添加子项</a></li>
        </ul>
        <div class="tab-content" style="position: relative; height: 550px; z-index: 5">
        </div>
    </div>
    <div class="delzx" style="display: none;">
        <div class="tabbable tabs-left">
            <ul class="nav nav-tabs zxmenu">
                <li class="active">
                    <a href="#tcjh" data-toggle="tab">修改子项计划</a>
                </li>
                <li>
                    <a href="#xgjh" data-toggle="tab">推迟所有任务</a>
                </li>

                <li>
                    <a href="#fzzxjh" data-toggle="tab">复制子项计划</a>
                </li>
                <li>
                    <a href="#deljh" data-toggle="tab">删除子项</a>
                </li>
            </ul>
            <div class="tab-content zxmenutab">
                <div class="tab-pane  in  active" id="tcjh">
                    <table class="table table-condensed table-hover">
                        <tr>
                            <td colspan="2" style="border-top-width: 0px; padding-bottom: 0px; padding-top: 0px;">
                                <div class="input-prepend">
                                    <span class="add-on">子项名称</span>
                                    <input class="span2 zxname" type="text" placeholder="子项名称">
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" style="border-top-width: 0px; padding-bottom: 0px; padding-top: 0px;">
                                <div class="input-prepend">
                                    <span class="add-on">开始日期</span>
                                    <input class="span2 form_date sdate" type="text" placeholder="开始日期">
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" style="border-top-width: 0px; padding-bottom: 0px; padding-top: 0px;">
                                <div class="input-prepend">
                                    <span class="add-on">结束日期</span>
                                    <input class="span2 form_date edate" type="text" placeholder="结束日期">
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td></td>
                            <td style="border-left: 0px">
                                <button type="button" class="btn btn-success updatezx" style="width: 120px">确认修改</button>

                            </td>
                        </tr>
                    </table>
                </div>
                <div class="tab-pane" id="xgjh">
                    <table class="table table-condensed table-hover" style="width: 200px">
                        <tr>
                            <td>"推迟子项"会自动调整子项中所有任务的岂止时间
                            </td>
                        </tr>
                        <tr>
                            <td style="border-top-width: 0px; padding-bottom: 0px; padding-top: 0px; margin-top: 40px;">
                                <div class="input-prepend">
                                    <span class="add-on">任务开始日期</span>
                                    <input class="span2 form_date tcdate" type="text" placeholder="任务开始日期" title="会自动调整子项中所有任务的岂止时间" />
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <button type="button" class="btn btn-info qrtc" style="width: 140px;">确认推迟任务</button></td>
                        </tr>
                    </table>

                </div>
                <div class="tab-pane" id="fzzxjh">

                    <table class="table table-condensed table-hover">
                        <tr>
                            <td style="border-top-width: 0px; padding-bottom: 0px; padding-top: 0px; margin-top: 40px;">
                                <div class="input-prepend">
                                    <span class="add-on">新子项名称</span>
                                    <input class="span2 newzxname" type="text" placeholder="新子项名称" required="required" autofocus="autofocus" />
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <button type="button" class="btn btn-info fzzx" style="width: 140px; margin-top: 40px;">确认复制子项</button>
                            </td>
                        </tr>
                    </table>
                </div>
                <div class="tab-pane" id="deljh">
                    <button type="button" class="btn btn-danger del" style="width: 140px; margin-top: 40px;">确认删除子项</button>

                </div>
            </div>
        </div>
    </div>

    <div class="addZX" style="display: none">
        <table class="table table-bordered table-condensed table-hover">
            <tr>
                <td colspan="2">


                    <div class="input-prepend">
                        <span class="add-on">子项名称</span>
                        <input class="span2 zxname" type="text" placeholder="请填写子项名称" required="required" autofocus="autofocus" />
                    </div>
                </td>

            </tr>
            <tr>
                <td colspan="2">
                    <div class="input-prepend">
                        <span class="add-on">开始日期</span>
                        <input class="span2 form_date sdate" type="text" placeholder="开始日期" title="修改计划开始时间任务会自动调整" />
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <div class="input-prepend">
                        <span class="add-on">结束日期</span>
                        <input class="span2 form_date edate" type="text" placeholder="结束日期" />
                    </div>
                </td>
            </tr>

            <tr>
                <td>
                    <button type="button" class="btn  btn-danger qx" style="width: 100px">取消</button>

                </td>
                <td style="border-left: 0px">
                    <button type="button" class="btn btn-success qd" style="width: 120px">确定</button>
                </td>

            </tr>
        </table>
    </div>

    <div class="Taskdv" style="display: none">
        <div class="tabbable">
            <ul class="nav nav-tabs rwmenu">
                <li class="active">
                    <a href="#divxgrw" data-toggle="tab">完成任务</a>
                </li>
                <li class="litc">
                    <a href="#tcrw" data-toggle="tab">推迟任务</a>
                </li>
                  <li class="liderw">
                    <a href="#delrw" data-toggle="tab">删除任务</a>
                </li>

            </ul>
            <div class="tab-content rwmenutab">
                <div class="tab-pane  in  active" id="divxgrw">
                    <table class="table table-bordered table-condensed table-hover">
                        <tr>
                            <td>
                                <div class="input-prepend">
                                    <span class="add-on" style="width: 90px">专业</span>
                                    <input class="span2 zyname" type="text" readonly />
                                </div>
                            </td>
                            <td>
                                <div class="input-prepend">
                                    <span class="add-on" style="width: 90px">任务名称</span>
                                    <input autofocus="autofocus" class="span2 taskname validate[required]" data-provide="typeahead" data-minlength="2" data-source='["设计评审","互提资料","完成产品","校对","审核","审定"]' type="text" required="required" placeholder="请填写任务名称" />
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div class="input-prepend">
                                    <span class="add-on" style="width: 90px">计划开始时间</span>
                                    <input class="span2  form_date sdate" type="text" placeholder="开始时间" />
                                </div>
                            </td>
                            <td>
                                <div class="input-prepend">
                                    <span class="add-on" style="width: 90px">计划结束时间</span>
                                    <input class="span2 form_date edate" type="text" placeholder="结束时间" />
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div class="input-prepend">
                                    <span class="add-on" style="width: 90px">人员</span>

                                    <input class="span2  taskuser" id="conTaskUser" type="text" placeholder="人员" />
                                </div>
                            </td>
                            <td>
                                <div class="input-prepend szzynamedv" style="display: none">
                                    <span class="add-on" style="width: 90px">收资专业</span>
                                    <input id="conZY" class="span2 szzyname" type="text" placeholder="请选择收资专业" data-provide="typeahead" data-minlength="2" data-source='["总图","建筑","结构","工艺","水","电控","暖通","经济"]'>
                                </div>
                            </td>
                        </tr>
                        <tr class="sjdate" style="display: none">
                            <td>
                                <div class="input-prepend asdatedv">
                                    <span class="add-on" style="width: 90px">实际开始时间</span>
                                    <input class="span2 asdate" type="text" readonly />
                                </div>
                            </td>
                            <td>
                                <div class="input-prepend aedatedv">
                                    <span class="add-on" style="width: 90px">实际结束时间</span>
                                    <input class="span2 aedate" type="text" readonly />
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <button type="button" class="btn  btn-danger qx" style="width: 100px">取消</button></td>
                            <td style="border-left: 0px">
                                <button type="button" class="btn btn-success qd" style="width: 120px">确定</button>
                            </td>
                        </tr>
                    </table>
                </div>
                <div class="tab-pane" id="tcrw">
                    <table class="table table-condensed table-hover">
                        <tr>
                            <td>"推迟任务"会自动调整该任务及之后所有任务的岂止时间
                            </td>
                        </tr>
                        <tr>
                            <td style="border-top-width: 0px; padding-bottom: 0px; padding-top: 0px; margin-top: 40px;">
                                <div class="input-prepend">
                                    <span class="add-on">任务开始日期</span>
                                    <input class="span2 form_date tcrwdate" type="text" placeholder="任务开始日期" title="会自动调整该任务及之后所有任务的岂止时间" />
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <button type="button" class="btn btn-info qrtcrw" style="width: 140px;">确认推迟任务</button></td>
                        </tr>
                    </table>

                </div>
                  <div class="tab-pane" id="delrw">
                    <button type="button" class="btn btn-danger delrw" style="width: 140px;">确认删除任务</button>

                </div>
            </div>
        </div>


    </div>
</body>
</html>
